package com.platform.modules.mall.activity.restrict;


import com.alibaba.fastjson.JSONObject;
import com.platform.modules.mall.activity.entity.bo.ActivityGoshoppingBo;
import com.platform.common.utils.Constant;
import com.platform.modules.mall.entity.MallActivityEntity;
import com.platform.modules.mall.entity.MallGoodsToActivityEntity;
import com.platform.modules.mall.service.MallGoodsToActivityService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


public abstract class RestrictAbstract implements RestrictInterface{

    @Autowired
    protected MallGoodsToActivityService mallGoodsToActivityService;

    @Override
    public List<MallGoodsToActivityEntity> getList(MallActivityEntity activity,ActivityGoshoppingBo bo) {

        Map<String, Object> params =new HashMap<>();
        params.put("activityId",activity.getId());
        params.put("isDelete",1);
        params.put("isOnSale",1);
        params.put("orderbySort"," order by T.SORT ");
        List<MallGoodsToActivityEntity> list = mallGoodsToActivityService.queryAll(params);
        return list;
    }


    @Override
    public boolean cancel(MallActivityEntity activityEntity, ActivityGoshoppingBo bo) {
        return true;
    }
}
